// import * as THREE from "three";
//
// const raycaster = new THREE.Raycaster();
// const mouse = new THREE.Vector2();
// let isOverCylinder = false;
//
// export const checkRaycaster = (event, map) => {
//     mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
//     mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
//     raycaster.setFromCamera(mouse, camera);
//     const intersects = raycaster.intersectObjects(scene.children);
//     if (intersects.length > 0 && intersects[0].object === cylinder) {
//         if (!isOverCylinder) {
//             isOverCylinder = true;
//             map._canvas.style.cursor = 'pointer'; // 改变Mapbox的cursor样式
//         }
//     } else {
//         if (isOverCylinder) {
//             isOverCylinder = false;
//             map._canvas.style.cursor = ''; // 重置cursor样式
//         }
//     }
// }
